<!--
 * @Author: 卡卡 1071780426@qq.com
 * @Date: 2023-09-27 17:43:02
 * @LastEditors: 贺楠 1071780426@qq.com
 * @LastEditTime: 2024-03-28 14:11:26
 * @FilePath: \mould\src\components\BehaViorManage\feedbackListText\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->

<template>
  <!-- 小弹框 width:500,height:0.3,top:15%  -->
  <!-- 中弹框 width:800,height:0.5,top:10% -->
  <!-- 大弹框 width:1060,height:0.76,top:5% -->

  <FormLyout :isSave="false">
    <template v-slot:formcon>
      <div v-if="flag==1" style="height: 100%">
        <div class="tab">
          <div
            v-for="(data, index) in typeData"
            :key="data.value"
            @click="changeType($event, index)"
          >
            <div
              class="btn"
              :style="{
                color: data.show === true ? 'rgba(0, 117, 255, 1)' : '#343639',
                background: data.show === true ? '#E0EFFF' : '#fff',
              }"
            >
              {{ data.text }}
            </div>
          </div>
        </div>
        <div
          class="charts"
          v-if="typeData[0].show"
          style="
            overflow: hidden;
            margin-bottom: 20px;
            display: flex;
            flex-direction: column;
          "
        >
          <div class="baseTitle" style="margin-top: 8px; display: flex">
            <div style="width: 150px; line-height: 45px" v-if="primaryInfo.data.fAd">
              设备名称：{{ primaryInfo.data.fAd }}
            </div>
            <div class="mechanism_nav app-container-search" style="flex: 1">
              <el-form ref="form" :model="getList" label-width="110px">
                <el-row :gutter="20">
                  <el-col :span="12"
                    ><el-form-item label="上传时间：">
                      <el-date-picker
                        v-model="getList.timeDates"
                        format="yyyy-MM-dd"
                        @change="selectTime"
                        value-format="yyyy-MM-dd"
                        type="date"
                        placeholder="选择日期"
                      >
                      </el-date-picker> </el-form-item
                  ></el-col>
                  <!-- <el-col :span="6"
              ><el-button
              type="primary"
              :loading="loading"
              @click="selectTime"
              >查询</el-button
            ></el-col> -->

                  <el-col :span="12"> </el-col>
                </el-row>
              </el-form>
            </div>
          </div>
          <div class="realTime" v-if="primaryInfo.data.fTemperature">
            <!-- currentDetail.fTemperature.substr(1,4 )-->
            <div
              class="left"
              v-if="
                primaryInfo.data.fTemperature.substr(1, 4) >=
                  primaryInfo.data.TemperatureMin &&
                primaryInfo.data.fTemperature.substr(1, 4) <=
                  primaryInfo.data.TemperatureMax
              "
            >
              <div class="icon"></div>
              <div class="title">
                <div class="titleTop">相对温度</div>
                <div class="titleNum">
                  {{ primaryInfo.data.fTemperature }}<span class="unit">℃</span>
                </div>
              </div>
              <div class="range">
                <div class="top">
                  最大值 {{ primaryInfo.data.TemperatureMax }}℃
                </div>
                <div class="bottom">
                  最小值 {{ primaryInfo.data.TemperatureMin }}℃
                </div>
              </div>
            </div>
            <div
              class="left"
              v-else-if="primaryInfo.data.fTemperature.substr(1, 4) == ''"
            >
              <div class="icon"></div>
              <div class="title">
                <div class="titleTop">相对温度</div>
                <div class="titleNum">暂无数据</div>
              </div>
              <div class="range">
                <div class="top">
                  最大值 {{ primaryInfo.data.TemperatureMax }}℃
                </div>
                <div class="bottom">
                  最小值 {{ primaryInfo.data.TemperatureMin }}℃
                </div>
              </div>
            </div>
            <div class="left1" v-else>
              <div class="img">
                <div class="imag">
                  <div class="img2"></div>
                </div>
              </div>
              <div class="title">
                <div class="titleTop">相对温度</div>
                <div class="titleNum">
                  {{ primaryInfo.data.fTemperature }}<span class="unit">℃</span>
                </div>
              </div>
              <div class="range">
                <div class="top">
                  最大值 {{ primaryInfo.data.TemperatureMax }}℃
                </div>
                <div class="bottom">
                  最小值 {{ primaryInfo.data.TemperatureMin }}℃
                </div>
              </div>
            </div>
            <div
              class="right"
              v-if="
                primaryInfo.data.fHumidity.substr(1, 4) >=
                  primaryInfo.data.Humidity &&
                primaryInfo.data.fHumidity.substr(1, 4) <= 100
              "
            >
              <div class="icon"></div>
              <div class="title">
                <div class="titleTop">相对湿度</div>
                <div class="titleNum">
                  {{ primaryInfo.data.fHumidity.substr(1, 4)
                  }}<span class="unit">%</span>
                </div>
              </div>
              <div class="range">
                <div class="top">最大值 100%</div>
                <div class="bottom">
                  最小值 {{ primaryInfo.data.Humidity }}%
                </div>
              </div>
            </div>
            <div
              class="right"
              v-else-if="primaryInfo.data.fHumidity.substr(1, 4) == ''"
            >
              <div class="icon"></div>
              <div class="title">
                <div class="titleTop">相对湿度</div>
                <div class="titleNum">
                  {{ primaryInfo.data.fHumidity.substr(1, 4)
                  }}<span class="unit">%</span>
                </div>
              </div>
              <div class="range">
                <div class="top">最大值 100%</div>
                <div class="bottom">
                  最小值 {{ primaryInfo.data.Humidity }}%
                </div>
              </div>
            </div>
            <div class="right1" v-else>
              <div class="img">
                <div class="imag1">
                  <div class="img2"></div>
                </div>
              </div>
              <div class="title">
                <div class="titleTop">相对湿度</div>
                <div class="titleNum">
                  {{ primaryInfo.data.fHumidity.substr(1, 4)
                  }}<span class="unit">%</span>
                </div>
              </div>
              <div class="range">
                <div class="top">最大值 100%</div>
                <div class="bottom">
                  最小值 {{ primaryInfo.data.Humidity }}%
                </div>
              </div>
            </div>

            <!-- <multiLevelTableData :config="type_config" :dataList="lqtableData" /> -->
          </div>
          <div class="jipeiBoxs">
            <myCharts :commonData="chartsData" :loading="loadings"></myCharts>
          </div>
        </div>

        <div
          class="charts"
          v-if="typeData[1].show"
          style="overflow: hidden; margin-bottom: 20px"
        >
          <div class="baseTitle" style="margin-top: 8px; display: flex">
            <div style="width: 150px; line-height: 45px" v-if="primaryInfo.data.fAd">
              设备名称：{{ primaryInfo.data.fAd }}
            </div>
            <div class="mechanism_nav app-container-search" style="flex: 1">
              <el-form ref="form" :model="getList" label-width="110px">
                <el-row :gutter="20">
                  <el-col :span="12"
                    ><el-form-item label="上传时间：">
                      <el-date-picker
                        format="yyyy-MM-dd"
                        value-format="yyyy-MM-dd"
                        v-model="getList.timeDates"
                        type="date"
                        @change="selectTime"
                        placeholder="选择日期"
                      >
                      </el-date-picker> </el-form-item
                  ></el-col>
                  <!-- <el-col :span="6"
            ><el-button
            type="primary"
            :loading="loading"
            @click="selectTime"
            >查询</el-button
          ></el-col> -->

                  <el-col :span="12"> </el-col>
                </el-row>
              </el-form>
            </div>
          </div>
          <div
            style="margin-top: 8px; height: 90%; box-sizing: border-box"
            class="lqlevelClass"
          >
            <tableData
              :page="getList.page"
              :pageSize="getList.pageSize"
              height="100%"
              totalNum="15"
              :config="table_config"
              :dataList="tableData"
              :loading="loading"
              :info="queryCriteriaData"
              :total="queryCriteriaData.total"
              :pageNum.sync="getList.page"
              :limit.sync="getList.pageSize"
              @pagination="getDetail(getList)"
            />
          </div>
        </div>
      </div>
    </template>
  </FormLyout>
</template>

<script src="./index.js"></script>
<style lang="less" scoped>
@import "./index.less";
</style>
